package com.example.boot1.util;

import java.util.concurrent.*;

public class ThreadPoolHelp {


    public static ExecutorService getThreadPool(){
        ExecutorService threadPool = new ThreadPoolExecutor(3,
                5,
                2,
                TimeUnit.SECONDS,
                new LinkedBlockingQueue<Runnable>(5000),
                Executors.defaultThreadFactory(),
                new ThreadPoolExecutor.AbortPolicy());
        return threadPool;
    }
}
